﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace WindowsGame1
{
    static class ParticleManager
    {
        static private List<Particle> particles = new List<Particle>();

        static public void addParticle(Particle particle)
        {
            particles.Add(particle);
        }

        static public void update()
        {
            for (int i = 0; i < particles.Count; i++)
            {
                particles[i].update();
            }
        }

        static public void draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            for (int i = 0; i < particles.Count; i++)
            {
                particles[i].draw(gameTime, spriteBatch);
            }
        }
    }
}
